#ifndef PARAMETERS_H_
#define PARAMETERS_H_

#include <cstdio>
#include <string>
#include <vector>

class Parameter;

class ParameterManager
{
private:
	std::vector <Parameter*> vParams;

public:
	typedef enum {AUTO_EQUALIZE, BLUR, BRIGHTNESS, CHANNEL, CHANNEL_R, CHANNEL_G, CHANNEL_B, CONTRAST, FLIP, GAMMA, GAUSSIAN, INPUT, INVERT, LAPLACE, OUTPUT, SHARPEN, THRESHOLD, GRAYSCALE, SILHOUETTE, ADD_DB, PIVOTE} PARAM_TYPE;

	const std::vector<Parameter*>& getParams() const
    {
        return vParams;
    }

    ParameterManager();
	virtual ~ParameterManager();

	bool load(int argc, char* argv[]);
	Parameter* const getParameter(PARAM_TYPE type);
	Parameter* const getParameter(unsigned int i)
	{
		return (i < vParams.size() ? vParams[i] : NULL);
	}
};

class Parameter
{
private:
	ParameterManager::PARAM_TYPE type;
	float fValue;
	std::string sValue;
public:
	Parameter(ParameterManager::PARAM_TYPE t, float v);
	Parameter(ParameterManager::PARAM_TYPE t, std::string v);
	virtual ~Parameter(){};

	ParameterManager::PARAM_TYPE getType()
	{
		return type;
	}

	float getFValue()
	{
		return fValue;
	}

	const std::string& getSValue()
	{
		return sValue;
	}
};

#endif
